package com.aphrodite.io.comm;

import java.io.IOException;

/**
 * Defines common routines for comm connections
 * 
 * @author kentelt
 * 
 */
public abstract class CommConnection extends Thread {
	protected boolean isConnected;
	protected String serverAddr;
	protected String serverPort;

	public void connect() throws IOException {
		if (!isConnected)
			this.start();
	}

	public abstract void disconnect() throws IOException;

	public boolean isConnected() {
		return isConnected;
	}

	public abstract void run();
}
